import BaseLayout from '@/components/layouts/BaseLayout/Index.vue';

export default [
  {
    path: '/',
    component: BaseLayout,
    children: [
      { path: '', name: 'homeIndex', meta: { title: '首页' }, component: (resolve) => require(['@/views/Home.vue'], resolve)}
    ]
  },

  {
    path: '/user',
    component: BaseLayout,
    children: [
      { path: 'index', name: 'userIndex', meta: { title: '用户列表' }, component: (resolve) => require(['@/views/user/Index.vue'], resolve) },
      { path: 'create', name: 'userCreate', meta: { title: '用户创建' }, component: (resolve) => require(['@/views/user/Create.vue'], resolve) },
      { path: 'Recharge', name: 'userRecharge', meta: { title: '用户充值' }, component: (resolve) => require(['@/views/user/Recharge.vue'], resolve) },
      { path: 'Message', name: 'userMessage', meta: { title: '用户留言' }, component: (resolve) => require(['@/views/user/Message.vue'], resolve) },
      { path: 'wallet/record', name: 'userWalletRecord', meta: { title: '财务日志' }, component: (resolve) => require(['@/views/user/Wallet/Record.vue'], resolve) }
    ]
  },

  {
    path: '/mutually',
    component: BaseLayout,
    children: [
      { path: 'index', name: 'mutuallyIndex', meta: { title: '匹配订单' }, component: (resolve) => require(['@/views/mutually/Index.vue'], resolve) }
    ]
  },

  {
    path: '/staff',
    component: BaseLayout,
    children: [
      { path: 'index', name: 'staffIndex', meta: { title: '管理员列表' }, component: (resolve) => require(['@/views/staff/Index.vue'], resolve) },
      { path: 'Recharge', name: 'staffRolesIndex', meta: { title: '角色列表' }, component: (resolve) => require(['@/views/staff/Roles/Index.vue'], resolve) }
    ]
  },

  {
    path: '/system',
    component: BaseLayout,
    children: [
      { path: 'notice/index', name: 'noticeIndex', meta: { title: '公告列表' }, component: (resolve) => require(['@/views/system/notice/Index.vue'], resolve) },
      { path: 'swipe/index', name: 'swipeIndex', meta: { title: '轮播列表' }, component: (resolve) => require(['@/views/system/swipe/Index.vue'], resolve) },
      { path: 'parameter/index', name: 'parameterIndex', meta: { title: '参数设置' }, component: (resolve) => require(['@/views/system/parameter/Index.vue'], resolve) },
      { path: 'cache/clear', name: 'cacheClear', meta: { title: '清空缓存' }, component: (resolve) => require(['@/views/system/cache/Clear.vue'], resolve) }
    ]
  },
];
